﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using TFXK.BLL;
using TFXK.Common;
using log4net;
using TFXK.Model;

public partial class GN_TravelInfo : System.Web.UI.Page
{

    private static readonly ILog log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
    private static readonly CategoryBLL bllCategory = new CategoryBLL();
    private static readonly TravelLinesBLL bllTravelLines = new TravelLinesBLL();
    public TravelLines modelTemp = new TravelLines();
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                this.Title += "-国内旅游";
                if (string.IsNullOrEmpty(Request.QueryString["Key"] + ""))
                {
                    Response.Redirect("GN_Travels.aspx");
                }
                else
                {
                    int Key = int.Parse(Request.QueryString["Key"] + "");
                    InitData(Key);
                }
            }
        }
        catch (Exception ex)
        {
            log.Error(ex.Message);
        }
    }
    public void InitData(int Key)
    {
        modelTemp = bllTravelLines.GetModel(Key);

        this.Title = modelTemp.title +"-下一站-下驿栈旅游网";
        if (string.IsNullOrEmpty(modelTemp.imagePath))
        {
            modelTemp.imagePath = "images/nopic.jpg";
        }
        else
        {
            modelTemp.imagePath = "uploads/" + modelTemp.imagePath;
        }
    }
}
